<%@ page contentType="text/html; charset=UTF-8" %>
<%@page import="com.infomanage.enums.*"%>
<%@page import="com.infomanage.service.hr.*"%>
<%@page import="com.infomanage.po.*" %>
<%  response.addDateHeader("Expires", 0);response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-cache");%>
<%
	String personId = request.getParameter("personId");
	if(personId == null) personId = "";
%>
<html>
<head>
	<title>新增/修改员工信息</title>
	<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
	<link href="../../css/table.css" rel="stylesheet" type="text/css">
	<link href="../../css/calendar.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="../../js/calendar.js"></script>
	<script type="text/javascript">
		var personGenerateId = "<%= personId%>";
		var currTreeInputObj = null;// 当前点击显示数输入框
		function showTree(obj) {
			currTreeInputObj = obj.childNodes[0];
			frame.location.href = "../common/deptTree.jsp";
			var treeFrame = document.getElementById("treeFrame");
			treeFrame.style.display = "";
			var region = obj.getBoundingClientRect();
			treeFrame.style.left = region.left;
			treeFrame.style.top = region.bottom;
			treeFrame.style.width = obj.clientWidth;
			treeFrame.style.height = 200;
		}

		function clickBody() {
			var srcObj = event.srcElement;
			var treeFrame = document.getElementById("treeFrame");
			if(srcObj.treeSelect == "true"){
				
			}else {
				treeFrame.style.display = "none";
			}
		}
		function selectNode(id, title){
			currTreeInputObj.value = title;
			currTreeInputObj.nextSibling.value = id;
			var treeFrame = document.getElementById("treeFrame");
			treeFrame.style.display = "none";
       }

	   function init() {
	   }

	   // 点击收起、展开
	   function changeStatus(obj){
		   var contentObj = obj.parentNode.parentNode.nextSibling;
		   var imgObj = obj.childNodes[0];
		   if(contentObj.style.display == ""){
			   contentObj.style.display = "none";
			   imgObj.src = "../../img/btn_spread.gif";
		   }else {
			   contentObj.style.display = "";
			   imgObj.src = "../../img/btn_shrink.gif";
		   }

		   var contentRow = null;
		   var displayCount = 0;
		   var contentCount = 6;
		   for(var i = 0; i < contentCount; i++) {
			   contentRow = document.getElementById("content" + i);
			   if(contentRow.style.display == ""){
				   displayCount++;
			    }
		   }
		   var utilRow = document.getElementById("utilRow");
		   if(displayCount == 0){
				utilRow.style.height = "auto";
		   }else {
			   utilRow.style.height = "1px";
		   }
	   }

	   // 点击头部，收起、展开
	   // 当点击的不是第一个时，需收起除第一个外的所有信息
	   function clickHeader(obj){
		   var contentObj = obj.parentNode.parentNode.nextSibling;
		   var isShrink = (contentObj.style.display == "");
		   var contentRow = null;
		   var imgObj = null;
		   if(contentObj.id != "content0"){
				if(isShrink){// 收起操作
					
			    }else {// 展开操作，需收起除第一个外的栏目
				    for(var i = 1; i < 6; i++){
				    	contentRow = document.getElementById("content" + i);
				    	contentRow.style.display = "none";
				    	imgObj = contentRow.previousSibling.childNodes[0].childNodes[1].childNodes[0];
						imgObj.src = "../../img/btn_spread.gif";
					}
				}
		   }

		   changeStatus(obj);
	   }
	   
	</script>
</head>
<body  rightmargin="0" bottommargin="0" leftmargin="0" topmargin="0">
	<table class="dialogTable" cellpadding="0" cellspacing="0">
		<!-- 基本信息-->
		<tr class="personTableHeader">
			<td>基本信息 <span onclick="clickHeader(this);"><img src="../../img/btn_shrink.gif"></span></td>
		</tr>
		<tr valign="top" id="content0">
			<td>
				<iframe frameborder="0" scrolling="auto" src="baseInfo_view.jsp?personId=<%=personId%>" height="100%" width="100%"></iframe>
			</td>
		</tr>
		
		<!-- 学历情况 -->
		<tr class="personTableHeader">
			<td>学历情况 <span onclick="clickHeader(this);"><img src="../../img/btn_shrink.gif"></span></td>
		</tr>
		<tr valign="top" id="content1">
			<td>
				<iframe frameborder="0" src="eduInfo_view.jsp?personId=<%=personId%>" height="100%" width="100%"></iframe>
			</td>
		</tr>
		
		<!--个人简历 -->
		<tr class="personTableHeader">
			<td>个人简历 <span onclick="clickHeader(this);"><img src="../../img/btn_spread.gif"></span></td>
		</tr>
		<tr valign="top" id="content2" style="display: none;">
			<td>
				<iframe frameborder="0" src="curriculumInfo_view.jsp?personId=<%=personId%>" height="100%" width="100%"></iframe>
			</td>
		</tr>
		
		<!--家庭情况 -->
		<tr class="personTableHeader">
			<td>家庭情况 <span onclick="clickHeader(this);"><img src="../../img/btn_spread.gif"></span></td>
		</tr>
		<tr valign="top" id="content3" style="display: none;">
			<td>
				<iframe frameborder="0" src="familyInfo_view.jsp?personId=<%=personId%>" height="100%" width="100%"></iframe>
			</td>
		</tr>
		
		<!--奖励情况 -->
		<tr class="personTableHeader">
			<td>奖励情况 <span onclick="clickHeader(this);"><img src="../../img/btn_spread.gif"></span></td>
		</tr>
		<tr valign="top" id="content4" style="display: none;">
			<td>
				<iframe frameborder="0" src="rewardInfo_view.jsp?personId=<%=personId%>" height="100%" width="100%"></iframe>
			</td>
		</tr>
		
		<!--学习培训经历 -->
		<tr class="personTableHeader">
			<td>学习培训 <span onclick="clickHeader(this);"><img src="../../img/btn_spread.gif"></span></td>
		</tr>
		<tr valign="top" id="content5" style="display: none;">
			<td>
				<iframe frameborder="0" src="trainInfo_view.jsp?personId=<%=personId%>" height="100%" width="100%"></iframe>
			</td>
		</tr>
		
		<tr id="utilRow" height="1px">
			<td>&nbsp;</td>
		</tr>
		<tr height="20px">
			<td class="tableBtn">
				<span onclick="window.close();">关闭</span>
				<span onclick="window.print();">打印</span>
			</td>
		</tr>
		<tr height="5px">
			<td>&nbsp;</td>
		</tr>
	</table>
</body>
</html>